//
//  BaseTableViewVc.m
//  WGFGlobalHouses
//
//  Created by welldone on 15/5/11.
//  Copyright (c) 2015年 waiguofang. All rights reserved.
//

#import "BaseTableViewVc.h"
#import "config.h"


@interface BaseTableViewVc ()

@end

@implementation BaseTableViewVc
@synthesize nodataCell;

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationController.navigationBar.hidden = NO;
    [self.tableView setSeparatorColor:[UIColor clearColor]];
    [self.view setBackgroundColor:[UIColor whiteColor]];
    
    [self.navigationItem setHidesBackButton:YES animated:YES];
    
    if (isIOS7) {
        self.edgesForExtendedLayout = UIRectEdgeNone;
    }
    
    if (isIOS7) {
        
        if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {
            [self.tableView setSeparatorInset:UIEdgeInsetsZero];
        }
    }
    
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    
    [self.tableView setBackgroundColor:UIColorFromRGB(0xf3f3f3)];
    [self.view setBackgroundColor:UIColorFromRGB(0xf3f3f3)];

    
    if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) {
        
        self.navigationController.navigationBar.tintColor = UIColorFromRGB(0xfd2e2f);
    } else {
        
        self.navigationController.navigationBar.barTintColor = UIColorFromRGB(0xfd2e2f);
    }

    [self initView];
}



-(void)initView{

    if(!nodataCell){
        
        nodataCell = [[NodataCell alloc] initWithFrame:self.tableView.frame];
        [nodataCell setState:nodataCellStateLoading];
        [[nodataCell refreshBtn]setTag:56];
        [nodataCell.refreshBtn addTarget:self action:@selector(btnOnClick:) forControlEvents:UIControlEventTouchUpInside];
    }

}


-(void)refreshData{

}


- (void)loadMore{


}

-(void)btnOnClick:(UIButton*)sender{


}

@end
